home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1995-02-26 | 1.8 KB | 78 lines |
- > MailCopy
- This short program copies the mailboxes in <Mail$Dir>.spool.mail.text
- to Bot:OtherMail, if the destination file exists the new file is
- appended to it.
- thowat@xargle.demon.co.uk
- "Hourglass_Smash":
- buffer% 256
- files$(255), types%(255)
- 'pos%=0:amax%=0:ap%=0:hgp%=0:hgmax=0
- &from$="<Mail$Dir>.spool.mail.text"
- out$="Bot:User.OtherMail."
- Get list of files & types...
- "Hourglass_On"
- "OS_GBPB",12,from$,buffer%,1,pos%,256,0
- ,,,n%,pos%
- pos%<>-1
- buffer%!20=&FFF
- ! types%(amax%)=buffer%!20
- ' files$(amax%)=
- str(buffer%+24)
- hgmax%=hgmax%+buffer%!8
- amax%=amax%+1
- buffer%!20<>&FFF
- 8
- "Warning : Non-text file '";
- str(buffer%+24);
- /
- "'"';
- (10);"in ";from$;", ignoring."
- "OS_GBPB",12,from$,buffer%,1,pos%,256,0
- ,,,n%,pos%
- Process boxes...
- ap%<amax%
- '# filein$=from$+"."+files$(ap%)
- fileout$=out$+files$(ap%)
- process(filein$,fileout$,types%(ap%))
- "Hourglass_Percentage",
- ((100/hgmax%)*hgp%)
- ap%=ap%+1
- "Hourglass_Off"
- process(filein$,fileout$,type%)
- inhan%,outhan%,buff$
- type%=&FFF
- inhan%=
- (filein$)
- hgp%=hgp%+
- #inhan%
- outhan%=
- (fileout$)
- outhan%=0
- outhan%=
- (fileout$)
- #outhan%=
- #outhan%
- #outhan%<>0
- #outhan%,""
- buff$=
- #inhan%
- #inhan%
- #outhan%,buff$
- buff$=
- #inhan%
-
- #inhan%
- #outhan%
- "OS_File",18,fileout$,&FFF
- "OS_File",6,filein$
- str(address%)
- ret$,index%,byte%
- index%=0
- byte%=address%?index%
- byte%<>0
- ret$+=
- byte%
- index%+=1
- byte%=address%?index%
- P =ret$
-